import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:zhrs/utils/StaticContent.dart';

class Intelligentcustomer extends StatefulWidget
{

  Intelligentcustomer({this.url='https://demo2.faqrobot.net/robot/h5chat_WD.html?sysNum=15155618951052101&receiveId=&sourceId=30081'});

  String url;
  @override
  _Intelligentcustomer createState()
  {

    return new _Intelligentcustomer();
  }
}

class _Intelligentcustomer extends State<Intelligentcustomer>
{

  @override
  void initState() {
    StaticContent.contexts=context;
    StaticContent.pageState=this;
    // TODO: implement initState
    super.initState();
  }
  @override
  Widget build(BuildContext context) {


    // TODO: implement build
    return   SafeArea(
        child: Scaffold (
        appBar:AppBar(title: Text("智能客服"),),
            body:    Container(
                      child: WillPopScope(
                          child:
                          WebView(
                            //  key:item.key,
                            initialUrl: widget.url,
                            javascriptMode: JavascriptMode.unrestricted,
                            onWebViewCreated: (WebViewController webViewController)
                            {

                            },
                            javascriptChannels: <JavascriptChannel>[
                            ].toSet(),

                            onPageFinished: (String url)async  {

                            },
                          ),

                    )

                )


    ));
  }

  @override
  void dispose() {

  }

}

